
@extends('admin.public.master')
@section('content')
    <div class="content-wrapper">
        <div class="content-wrapper-before"></div>
        <div class="content-header row">
            <div class="content-header-left col-md-1 col-4 mb-2">
                <a href="{{route('admin.administrator.index')}}"> <h5 class="content-header-title">管理员列表</h5></a>
            </div>
            <div class="content-header-left col-md-1 col-4 mb-2">
                <a href="{{route('admin.administrator.create')}}"><h5 class="content-header-title">添加管理员</h5></a>
            </div>
        </div>
        <form action="{{route('admin.administrator.update',$administrator)}}" method="post">
            @csrf @method('PUT')
            <div class="content-body">
                <div class="card">
                    <div class="card-body">
                        <div class="row ml-2 mt-1">
                            <div class="col-6">
                                <div class="form-group">
                                    <label for="">管理员名</label>
                                    <input type="text" class="form-control" name="name"  value="{{$administrator->name}}" aria-describedby="helpId" placeholder="管理员名">
                                </div>
                            </div>
                        </div>
                        <div class="row ml-2 mt-1">
                            <div class="col-6">
                                <div class="form-group">
                                    <label for="">账号</label>
                                    <input type="text" class="form-control" name="account"  value="{{$administrator->phone?$administrator->phone:$administrator->email}}" aria-describedby="helpId" placeholder="手机或者邮箱">
                                </div>
                            </div>
                        </div>
                        <div class="row ml-2 mt-1">
                            <div class="col-6">
                                <div class="form-group">
                                    <label for="">密码</label>
                                    <input type="text" class="form-control" name="password" {{$administrator->password}}  aria-describedby="helpId" placeholder="密码">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="card-footer text-muted ml-2 mt-1" >
                        <button type="submit" class="btn btn-primary ">保存数据</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
@endsection


